1. Field of the Invention
The present invention relates to a method and apparatus for measuring distance to an obstacle which can be equipped to a self-propelled robot and the like, and more particularly to a method and for measuring distance to an obstacle which can improve distance resolution not by relying on an analog-to-digital conversion time but by relying on a system clock (main clock). The invention can distinguish noise by varying a reference voltage in order to discriminate whether the same is a signal reflected from the obstacle and received therefrom and can distinguish an accurate measurement by mutual comparison after measuring the distance by way of two methods to thereby detect accurately the distance to the obstacle.
2. Description of the Prior Art
An ultrasonic wave sensor has been conventionally used for measuring a distance to an obstacle in the case of a moving robot with which movement and obstacle detection are possible.
Because the ultrasonic wave moves approximately 34D meters per second, a distance to an obstacle can be calculated by measuring the transmitted and received time of the ultrasonic wave.
In other words, the distance to the obstacle has been measured by calculating a time between reflection of an ultrasonic wave transmitted to the obstacle and receipt of the same.
A distance measuring apparatus of a moving robot utilizing the ultrasonic wave thus described, for the most part, has used a plurality of ultrasonic wave sensors in consideration of various states of the obstacles, and the distance to the obstacle is measured by operating each ultrasonic wave sensor in due sequence out of the plurality of ultrasonic wave sensors.
However, sequential operation of each sensor takes considerable time until the distance measurement by way of the plurality of sensors is completed, to thereby bring about a problem in that capability of detecting the distance to the obstacle is reduced.
A Japanese patent No. Hei 4-168508, entitled "moving robot" has somewhat solved the aforementioned problem.
The "moving robot" disclosed in the Japanese patent No. Hei 4-168508 for enabling detection of a moving object and obstacle comprises: a plurality of distance measuring ultrasonic wave sensors for transmitting ultrasonic waves in the same direction to thereby measure a distance to an obstacle; a distance measurement control means for simultaneously activating the ultrasonic wave sensors to thereby perform simultaneous multiple distance measurements and for adopting as a shortest distance to the obstacle a minimum value out of multiple measurements of distance values obtained as a result of the distance measurement.
The moving robot comprises 7 ultrasonic wave sensors for distance measurement of forward movement, 2 ultrasonic wave sensors for distance measurement of each left and right side, totalling 9 sensors. If all 9 sensors are simultaneously activated, measurement time for each direction can be shortened by 1/3 with measurement by activation of 9 sensors in sequence.
In other words, if an operation interval of each distance measuring ultrasonic wave sensor is given as 100 msec, it takes 900 msec to complete the distance measurement with 9 sensors operated in sequence.
However, if the ultrasonic wave sensors for distance measurement of forward movement are all activated at the same time, obstacle detection of forward, left and right sides can be completed in 300 msec.
In the case of the moving robot for detecting obstacles by utilizing ultrasonic wave sensors thus described, an Analogue-to-Digital Converter ADC of a microcomputer has been used in order to detect whether or not the ultrasonic waves are received.
In other words, the microcomputer checks signals being input to a conversion terminal of the ADC at a predetermined time interval (Analogue-to-Digital (AD) conversion time) to thereby determine whether or not the ultrasonic waves are received (determine whether or not digitalized signals are input), and if the ultrasonic waves are received, a distance to the obstacle is calculated by transmission-receipt time of the ultrasonic waves.
However, this kind of conventional distance measurement apparatus has a drawback in it has a low distance resolution.
By way of example, if the A/D conversion is performed at 1 msec intervals the ultrasonic wave can travel 34 cm 1 sec:340 m=1 msec:34 cm), and if a round trip of transmission and receipt is taken into account, the ultrasonic wave is reflected and received from an object approximately 17 cm away, after the transmission of the ultrasonic wave, which means that the distance measurement apparatus has a distance resolution of 17 cm if the A/D conversion is performed every 1 msec, and it means that 18-34 cm can be discriminated as the same distance.
Therefore, in order to have a resolution of 1 cm, the A/D conversion should be performed approximately every 58 .mu.sec, and in the conventional microcomputer, if the A/D conversion is performed for every short time like this, the microcomputer cannot perform other operations, and in the worst case, becomes inoperable.
Accordingly, the conventional distance resolution has been over 5 cm.
In the case of the self-propelled robot for conducting a certain operation (for example, forward movement, mapping data accumulation and the like) by detecting obstacles, an accurate movement cannot be done due to the limit in the distance resolution of approximately 5 Cm.